<template>
    <div class="all">
        <div class="ding ding1"><i></i></div>
        <div class="ding ding2"><i></i></div>
        <div class="ding ding3"><i></i></div>
        <div class="ding ding4"><i></i></div>
        <el-row>
            <el-col :span="11">
                <div class="hidden">
                    <div class="left" ref="left">
                        <h3>欢迎来到史上最 " <b style="color: red">牛X</b> 、<b style="color: red">BUG</b>" 最多的后台管理系统</h3>
                        <h3>由于画面过于暴力</h3>
                        <h3>请未满 <b style="color: red">18</b> 周岁的儿童在父母的陪同下，使用本系统</h3>
                        <h3>由于BUG过多</h3>
                        <h3>随时可能导致您的 电脑死机、冒烟、休克等</h3>
                        <h3>更有甚者; 可能会对您人身造成攻击</h3>
                        <h3>那么废话不多说</h3>
                        <h3>推荐几个能减少意外的情况的操作 <span>👉</span></h3>
                    </div>
                </div>
            </el-col>
            <el-col :span="2">
                <div class="shuxian"></div>
            </el-col>
            <el-col :span="11">
                <div class="hidden2">
                    <h3><b style="color: red"><b style="color: yellow">* </b>为了更好的体验, 请先确认你的电脑配置</b></h3>
                    <h3><b style="color: red"><b style="color: yellow">* </b>推荐您使用 分辨率 为 :</b> 1920 * 1080</h3>
                    <h3><b style="color: red"><b style="color: yellow">* </b>文本、应用等项目布局大小 :</b> 100%</h3>
                    <h3><b style="color: red"><b style="color: yellow">* </b>修改位置为 :</b> 电脑左下角-> 设置 -> 显示, 里面</h3>
                    <h3><b style="color: yellow">* </b>. . . . . . </h3>
                </div>
            </el-col>
        </el-row>
    </div>
</template>

<script>
export default {
    name: 'dashboard',
    data() {
        return {
            num: -400,
            timer: null
        }
    },
    mounted() {
        // 左面数据慢慢出现
        this.timer = setInterval(() => {
            this.num = this.num + 2 
            this.$refs['left'].style.bottom = this.num + 'px'
            if(parseInt(this.num) === 0) {
                clearInterval(this.timer)
            }
        },40)
    },
    // 组件销毁
    beforeDestroy(){
        // 组件销毁时,如果这个定时器存在，清除
        if(this.timer){
            clearInterval(this.timer)
        }
    }
}
</script>

<style lang="scss" scoped>
.all{
    width: 100%;
    height: 100%;
    position: relative;
}
.el-row{
    width: 100%;
    height: 100%;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}
.el-col{
    height: 100%;
    position: relative;
    div{
        text-align: center;
    }
}
.left{
    position: absolute;
    bottom: -400px;
    width: 100%;
    h3{
        span{
            font-size: 14px;
            display: inline-block;
            margin-left: 10px;
            width: 20px;
            height: 20px;
            position: relative;
            top: -5px;
            animation: scale .4s  linear infinite;
        }
    }
}
.right{
    height: 600px;
}
.hidden{
    height: 380px;
    width: 100%;
    position: relative;
    overflow: hidden;
    top: 50%;
    transform: translateY(-50%);
}
.hidden2{
    height: 90%;
    width: 70%;
    position: absolute;
    text-align: left !important;
    background-color: rgba(0,0,0,.5);
    box-shadow:0px 0px 10px 3px #20AAE9;
    border-radius: 10px;
    overflow: hidden;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    h3{
        padding-left: 10%;
    }
}

@keyframes scale {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(3);
    }
}
.ding{
    cursor: not-allowed;
    z-index: 1;
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #145d80;
    box-shadow:0px 0px 10px 4px #20AAE9;
    i{
        display: block;
        background-color: #20AAE9;
        width: 49px;
        height: 4px;
        margin: 25px auto;
        transform: rotate(-45deg);
        margin-left: 2px;
    }
}
.ding1{
    top: 10px;
    left: 10px;
}
.ding2{
    right: 10px;
}
.ding3{
    left: 10px;
    bottom: 10px;
}
.ding4{
    right: 10px;
    bottom: 10px;
}
.shuxian{
    width: 2px;
    height: 500px;
    background-color: #20AAE9;
    box-shadow:0px 0px 100px 30px #20AAE9;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: shuxian 1s linear;
    animation-fill-mode: forwards;
}

@keyframes shuxian {
    form{
        box-shadow:0px 0px 100px 30px #20AAE9;
    }
    to{
        box-shadow:0px 0px 10px 3px #20AAE9;
    }
}

</style>